/////////////////////////////////////////////////////////////////////////
// Describe		: 
// Author		: linx214
// Created		: 2012-9-16  4:10
// Modify Record: 
/////////////////////////////////////////////////////////////////////////

#ifndef MYPIXMAPITEM_HPP_
#define MYPIXMAPITEM_HPP_

#include <QtGui/QGraphicsPixmapItem>
#include <QtCore/QObject>

class QMyPixmapItem : public QObject, public QGraphicsPixmapItem
{
	Q_OBJECT

public:
	QMyPixmapItem(const QPixmap &pixmap, QGraphicsItem *parent = 0);
	~QMyPixmapItem();

public:
	void		setURL( const QString& qstrURL ){ m_qstrURL = qstrURL; }

private:
	QString		URL(){ return m_qstrURL; }

signals:
	void	sig_MouseHoverIn();
	void	sig_MouseHoverOut();

protected:
	virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
	virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
	virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);

	virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);

private:
	QString		m_qstrURL;
};

#endif // MYPIXMAPITEM_HPP_